#pragma once

#include "IMathInterface.h"
#include <math.h>

class CMath : public ISimpleArithmetic, public ITrigonometric
{
public:
	CMath();
	~CMath();
	//IUnknown implementation
	virtual HRESULT __stdcall	QueryInterface(const IID& riid, void **ppvObject);
	virtual ULONG __stdcall		AddRef();
	virtual ULONG __stdcall		Release();
	//ISimpleArithmetic implementation
	virtual int __stdcall		add(int a, int b){return a+b;}
	virtual int __stdcall		sub(int a, int b){return a-b;}
	//ITrigonometric implementation
	virtual double __stdcall	sin(double fAngle){return ::sin(fAngle);}
	virtual double __stdcall	cos(double fAngle){return ::cos(fAngle);}
private:
	ULONG				m_uRef;
};
